E: 0,1,2,3.
L: *[],[0],[1],[2],[3],[01],[02],[03],[10],[12],[13],[20],[21],[23],[30],[31],[32],[012],[013],[021],[023],[031],[032],[102],[103],[120],[123],[130],[132],[201],[203],[210],[213],[230],[231],[301],[302],[310],[312],[320],[321],[0123],[0132],[0213],[0231],[0312],[0321],[1023],[1032],[1203],[1230],[1302],[1320],[2013],[2031],[2103],[2130],[2301],[2310],[3012],[3021],[3102],[3120],[3201],[3210].

*elt(E)
0
1
2
3
.
*components(L,E,L) #--/-##
[0], 0, []
[1], 1, []
[2], 2, []
[3], 3, []
[01], 0, [1]
[02], 0, [2]
[03], 0, [3]
[10], 1, [0]
[12], 1, [2]
[13], 1, [3]
[20], 2, [0]
[21], 2, [1]
[23], 2, [3]
[30], 3, [0]
[31], 3, [1]
[32], 3, [2]
[012], 0, [12]
[013], 0, [13]
[021], 0, [21]
[023], 0, [23]
[031], 0, [31]
[032], 0, [32]
[102], 1, [02]
[103], 1, [03]
[120], 1, [20]
[123], 1, [23]
[130], 1, [30]
[132], 1, [32]
[201], 2, [01]
[203], 2, [03]
[210], 2, [10]
[213], 2, [13]
[230], 2, [30]
[231], 2, [31]
[301], 3, [01]
[302], 3, [02]
[310], 3, [10]
[312], 3, [12]
[320], 3, [20]
[321], 3, [21]
[0123], 0, [123]
[0132], 0, [132]
[0213], 0, [213]
[0231], 0, [231]
[0312], 0, [312]
[0321], 0, [321]
[1023], 1, [023]
[1032], 1, [032]
[1203], 1, [203]
[1230], 1, [230]
[1302], 1, [302]
[1320], 1, [320]
[2013], 2, [013]
[2031], 2, [031]
[2103], 2, [103]
[2130], 2, [130]
[2301], 2, [301]
[2310], 2, [310]
[3012], 3, [012]
[3021], 3, [021]
[3102], 3, [102]
[3120], 3, [120]
[3201], 3, [201]
[3210], 3, [210]
.
sort(L, L) #-
[], []
[0], [0]
[1], [1]
[2], [2]
[3], [3]
[01], [01]
[02], [02]
[03], [03]
[10], [01]
[12], [12]
[13], [13]
[20], [02]
[21], [12]
[23], [23]
[30], [03]
[31], [13]
[32], [23]
[012], [012]
[013], [013]
[021], [012]
[023], [023]
[031], [013]
[032], [023]
[102], [012]
[103], [013]
[120], [012]
[123], [123]
[130], [013]
[132], [123]
[201], [012]
[203], [023]
[210], [012]
[213], [123]
[230], [023]
[231], [123]
[301], [013]
[302], [023]
[310], [013]
[312], [123]
[320], [023]
[321], [123]
[0123], [0123]
[0132], [0123]
[0213], [0123]
[0231], [0123]
[0312], [0123]
[0321], [0123]
[1023], [0123]
[1032], [0123]
[1203], [0123]
[1230], [0123]
[1302], [0123]
[1320], [0123]
[2013], [0123]
[2031], [0123]
[2103], [0123]
[2130], [0123]
[2301], [0123]
[2310], [0123]
[3012], [0123]
[3021], [0123]
[3102], [0123]
[3120], [0123]
[3201], [0123]
[3210], [0123]
.
*lt(E,E) ##
0, 1
0, 2
0, 3
1, 2
1, 3
2, 3
.
